<script setup>
import {ref, watch} from "vue"
const props = defineProps({
    data:Object
})
const text = ref(1)
</script>

<template>
    <div class="top-info">
        <div class="avatar">
            <van-image round fit="cover" width="110px" height="110px" :src="data.avatar"></van-image>
        </div>
        <div class="info">
            <div class="name">
                <div style="font-size: 20px;font-weight: bold;">{{data.name}}</div>
                <van-tag type="primary" size="large" :color="data.sex === 1? 'var(--main-color)':'pink'">{{data.sex === 1? '男':'女'}}</van-tag>
            </div>
            <div class="van-ellipsis">{{data.occupation}}</div>
            <div class="van-ellipsis">{{data.school}}</div>
            <div class="van-ellipsis">{{data.major}}</div>
        </div>
    </div>
</template>

<style scoped>
.top-info{
    display: flex;
}

.info div{
    margin: 5px;
}
.name{
    display: flex;
    align-items: center;
    margin: 0px;
}
.name div{
    margin: 0px;
    margin-right: 5px;
}
</style>
